The type ty_s_so consists of a structure of type
zcl_z_epm_rkt_mpc=>ts_salesorder (which in turn is of type
BAPI_EPM_SO_HEADER) and a table type of made up of structure
zcl_z_epm_rkt_mpc=>ts_salesorderitem (which is turn is of type
BAPI_EPM_SO_ITEM). Declare a structure variable ls_so using type
ty_s_so, which is used to capture the sales order header data
along with the multiple line items passed into the method. Then the data is broken
up into the required header and item data structures needed as input for function
BAPI_EPM_SO_CREATE.
Upon success, the created sales order entity along with its corresponding line
items are read and sent back to the consumer in the response body.
|